<template>
  <li class="NavAvatar">
    <h3
      :style="{
        backgroundImage: `url(${
          store.state.centerData[1] &&
          store.state.BaseUrl + store.state.centerData[1].adminAvatar
        })`,
      }"
    ></h3>
    <div class="NavCard">
      <div class="CardItem" @click="$router.push('/home/main')">文章</div>
      <div class="CardItem" @click="$router.push('/home/classify')">分类</div>
      <div class="CardItem" @click="$router.push('/talk')">动态</div>
    </div>
  </li>
</template>

<script lang="ts" setup>
import { inject } from 'vue'
const store: any = inject('store')
</script>

<style scoped lang="scss">
.NavAvatar {
  display: none;
}

@media (max-width: 760px) {
  .NavAvatar {
    height: 80px;
    display: block;
    padding: 0 9px;

    > h3 {
      width: 50px;
      height: 50px;
      margin: 2px auto;
      border-radius: 50%;
      background-size: cover;
      background-color: aquamarine;
    }

    .NavCard {
      display: flex;
      justify-content: space-between;

      .CardItem {
        display: flex;
        justify-content: center;
        font-size: 14px;
        color: #057fe4;
      }
    }
  }
}
</style>
